/**
 * 频道相关 api 模块
 */

import request from '@/utils/request'

// 获取所有频道信息
export const apiGetAllChannelData = () => {
  return request({
    method: 'GET',
    url: '/app/v1_0/channels'
  })
}

// 增加频道信息
export const apiAddChannelData = data => {
  return request({
    method: 'PATCH',
    url: '/app/v1_0/user/channels',
    data
  })
}

// 删除频道信息
export const apiDeleteChannelData = channelId => {
  return request({
    method: 'DELETE',
    url: `/app/v1_0/user/channels/${channelId}`
  })
}
